/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TelaInicial.java
 *
 * Created on 23/06/2011, 14:45:38
 */

package Window;

import Controladores.ControladorMesa;
import Controladores.ControladorJanela;
import Sueca.Carta;
import Sueca.Jogador;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author Rafael
 */
public class TelaInicial extends javax.swing.JFrame {

    private static ControladorMesa m_mesaCtrl;
    private static ControladorJanela m_janelaCtrl;

    /** Creates new form TelaInicial */
    public TelaInicial() {
        initComponents();

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        titulo = new javax.swing.JLabel();
        botaoPorCima = new javax.swing.JButton();
        botaoPorBaixo = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        titulo.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        titulo.setText("Como você quer que seja distribuídas as cartas?");

        botaoPorCima.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        botaoPorCima.setText("Por Cima");
        botaoPorCima.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botaoPorCimaMouseClicked(evt);
            }
        });
        botaoPorCima.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoPorCimaActionPerformed(evt);
            }
        });

        botaoPorBaixo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        botaoPorBaixo.setText("Por Baixo");
        botaoPorBaixo.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botaoPorBaixoMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(titulo, javax.swing.GroupLayout.DEFAULT_SIZE, 384, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGap(28, 28, 28)
                .addComponent(botaoPorCima)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 149, Short.MAX_VALUE)
                .addComponent(botaoPorBaixo)
                .addGap(45, 45, 45))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(titulo, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botaoPorCima)
                    .addComponent(botaoPorBaixo))
                .addContainerGap(190, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botaoPorCimaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoPorCimaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_botaoPorCimaActionPerformed

    private void botaoPorCimaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botaoPorCimaMouseClicked
        // TODO add your handling code here:
        int opcao = 0;
        try {
            Main principal = new Main();
            principal.setTrunfoteste(opcao);
            //m_mesaCtrl.setOpcao(opcao);
        } //catch (IOException ex) {
            //Logger.getLogger(TelaInicial.class.getName()).log(Level.SEVERE, null, ex);
        //}
        finally{
            
        }
    }//GEN-LAST:event_botaoPorCimaMouseClicked

    private void botaoPorBaixoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botaoPorBaixoMouseClicked
        // TODO add your handling code here:
        int opcao = 1;
        try {
            Main principal = new Main();
            principal.setTrunfoteste(opcao);
            //m_mesaCtrl.setOpcao(opcao);
        } //catch (IOException ex) {
            //Logger.getLogger(TelaInicial.class.getName()).log(Level.SEVERE, null, ex);
        finally{
            
        }
    }//GEN-LAST:event_botaoPorBaixoMouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TelaInicial().setVisible(true);
            }

        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botaoPorBaixo;
    private javax.swing.JButton botaoPorCima;
    private javax.swing.JLabel titulo;
    // End of variables declaration//GEN-END:variables

}
